<?php App::uses('CakeNumber', 'Utility'); ?>
<div class="head_title"> <h1 align="center">BẢNG CA LÀM VIỆC</h1></div>

<table>
    <thead>
        <tr>
            <th>ID</th>
            <th>THỜI GIAN BẮT ĐẦU</th>
            <th>THỜI GIAN KẾT THÚC</th>
            <th>LƯƠNG (VNĐ)</th>
            <th>THAY ĐỔI</th>
        </tr>
    </thead>

<!-- Here's where we loop through our $posts array, printing out post info -->

    <?php foreach ($calamviecs as $calamviec): ?>
    <tr>
        <td>
            <?php echo $calamviec['CaLamViec']['id'];?>
        </td>
        <td>
             <?php echo $calamviec['CaLamViec']['THOIGIANBD'];?>
        </td>
        <td>
             <?php echo $calamviec['CaLamViec']['THOIGIANKT'];?>
        </td>
        <td>
             <?php echo CakeNumber::currency($calamviec['CaLamViec']['LUONG'],'', array('thousands'=> '.',  'decimals' => ',',));?>
        </td>
        <td>
            <?php echo $this->Html->link($this->Html->image('/images/user_edit.png'), array('action' => 'edit', $calamviec['CaLamViec']['id']), array('escape' => false));?>
			<?php echo $this->Html->link($this->Html->image('/images/trash.png'), array('action' => 'delete', $calamviec['CaLamViec']['id']),
            array('confirm' => 'Bạn có chắc muốn xóa?', 'escape' => false));?>
        </td>
    </tr>
    <?php endforeach; ?>

</table>
<div id="pagination">
    <div class="paging">
        <?php echo $this->Paginator->first('Trang đầu'); ?>
        <?php echo $this->Paginator->prev('<<' . __('Lùi', true),
        array(), null, array('class' => 'disabled')); ?>
        <?php echo $this->Paginator->numbers(); ?>
        <?php echo $this->Paginator->next(__('Tới', true) . '>>',
        array(), null, array('class' => 'disabled')); ?>
        <?php echo $this->Paginator->last('Trang cuối'); ?>
    </div>
</div>
<p><?php echo $this->Html->link('Thêm ca làm việc', array('action' => 'add'), array('class' => 'add')); ?></p>